<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GBC锁仓</title>
<meta charset="utf-8" />
<link href="__CSS__/bootstrap.min.css" rel="stylesheet">
<link href="__CSS__/bootstrap.css" rel="stylesheet">
<link href="__CSS__/Login.css" rel="stylesheet">
<script src="__JS__/jquery-1.7.2.min.js"></script>
<script src="__JS__/layer/layer.js"></script>
<script src="__JS__/bootstrap.min.js"></script>
</head>

<style type="text/css">
.inputys{background-color:rgba(255,255,255,0); height:40px;outline: none; border:0px; color:#fff;width:100%;}
* {padding:0;margin:0;}

table {border-collapse:collapse;border:1px #424664 solid;margin:0 auto; color:#bdc8e9;}
th, td {border:1px #424664 solid;text-align:center;font-size:12px;line-height:30px;}
th {line-height:50px;} 
/*模拟对角线*/
.out {width:0px;height:0px;position:relative;}
b {font-style:normal;display:block;position:absolute;top:-23px;left:30px;width:77px; line-height:15px;}
em {font-style:normal;display:block;position:absolute;top:-5px;left:-30px;width:100px; line-height:15px;}
span.line{ display:block; width:100px; height:1px; background:#424664;-webkit-transform:rotate(28deg);-ms-transform:rotate(28deg); -moz-transform:rotate(28deg); transform:rotate(28deg); position:absolute; top:0px; left:-3px;}
option {
    background: #162146;
}
.time-selected:active,.time-selected:hover,,.time-selected:focus {
    background: red;
}

#page a {
    text-decoration:none;
}
.close-all {
    text-align: center;
}
.close-img {
    width: 55px;
}
.close-ck {
    padding-top: 11px;
}
.row-fluid{
    margin-top: 10px;
}
</style>

<body style="padding-top: 38px">

    <div class="title1" > 
        GBC锁仓
    </div> 

    <div class="container">
        <div class="row-fluid qk" style=" margin-top:60px; height:230px; "> 
       
            <div style="  color:#fff; padding-top:15px; width:70%; float:left; padding-left:15px;">
                <p class="t1">我的锁仓总量(GBC)</p>
                <p class="t2" style=" color:#00bf86">{$lockAmount|default='0.00'}</p>
                <p class="t3">฿ {$lockAmount / $btcPrice | round=###,8}</p>           
            </div>

            <div class="close-all" style=" color:#fff; padding-top:15px; width:30%; float:left;">
                
                    <img class="close-img" src="__IMG__/logo-3.png" />
                    <div class="close-ck">                    
                        锁仓记录                    
                    </div>
                </a>
            </div>


            <div style="width:100%;height:1px;margin:15px auto;background-color:#182240;overflow:hidden;">                
            </div>

            <div style="float:left; width:50%; padding-left:15px;">
                <p class="t1"  style=" color:#808bab;">本月累计释放(GBC)</p>
                <p class="t1">{$usercurrentMonth|default='0.00'}</p>
                <p class="t3">฿ {$usercurrentMonth / $btcPrice | round=###,8}</p>
            </div> 
         
            <div style="  float:left; width:50%; padding-left:15px;">
               <p class="t1" style=" color:#808bab;">今日释放数量(GBC)</p>
               <p class="t1">{$todayUserData|default='0.00'}</p>
               <p class="t3">฿ {$todayUserData  / $btcPrice | round=###,8}</p>
            </div>
        </div>    
        
        <div class="t3" style=" padding-top:10px; font-size:18px;color: #FFF;">锁仓</div>

        <div class="row-fluid qk"> 

            <div class=" t1" style="padding-top:1px; padding-left:15px;color: #808bab;width: 100%;">
                
                <!-- <span style="float: right;margin-right: 15px;">账单</a></span> -->
            </div>
                <div style=" height:40px;background-color:#162146; margin:15px 15px 0px 15px;">
                    <div class="t3" style=" float:left; height:40px; line-height:40px; color:#808bab; margin-left:10px; width:20%;">可用余额</div>  
                    <div style=" float:left; padding-left:10px; width:60%;"> 
                        <input type="text" placeholder="输入数量" value="{$userData['reward1']}" class="inputys" >
                    </div>
                    <div class="t3" style=" float:right; height:40px;line-height:40px; margin-right:10px;">GBC</div>
                </div>
                  
                <div style=" height:40px;  background-color:#162146; margin:15px 15px 0px 15px;">
                    <div class="t3" style=" float:left; height:40px; line-height:40px; color:#808bab; margin-left:10px; width:20%;">锁仓数量</div>  
                    <div style=" float:left; padding-left:10px; width:60%;">
                        <input type="text" id="amount" placeholder="输入数量" class="inputys" >
                    </div>
                    <div class="t3" id="all" style=" float:right; height:40px; line-height:40px;padding-right:10px;color: #2cd0da;">全部</div>
                </div>

                <div style=" height:40px;  background-color:#162146; margin:15px 15px 0px 15px;">
                    <div class="t3" style=" float:left; height:40px; line-height:40px; color:#808bab; margin-left:10px; width:20%;">锁仓时间</div>  
                    <div style=" float:left; padding-left:10px; width:74%;">
                        <!-- <input type="text" id="nums" placeholder="输入数量"  > -->
                        <select class="inputys time-selected" style="color: 000;" id="locktime">
                            <option value="1">6个月</option>
                            <option value="2">12个月</option>
                            <option value="3">18个月</option>
                        </select>
                    </div>
                    <!-- <div class="t3" style=" float:right; height:40px; line-height:40px;padding-right:10px; ">GBC</div> -->
                </div>

                <div style=" margin:15px 15px 0px 15px;">
                    <button id="btn-1" type="button">锁仓</button>
                </div>

                <div style=" height:15px;"></div>                 
           </div>   
        
        <div class="t3" style=" padding-top:10px; font-size:18px;color: #FFF;">锁仓释放比例</div>
        <div class="row-fluid qk"> 
            <!-- <div class="t3" style=" padding:15px 15px 15px 15px;">锁仓释放比例</div> -->
            <div style=" padding:15px 15px 15px 15px;">
                 <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th style="width:90px;">
                            <div class="out">
                                <b>数量<br/>GBC</b>
                                <span class="line"></span>
                                <em>锁仓<br/>期限</em>
                            </div>
                        </th>
                        <th>>=3000</th>
                        <th>>=10,000</th>
                        <th>>=50,000</th>
                    </tr>
                    <tr>
                        <td>6个月</td>
                        <td>{$configData['canshu5'] * 100}%</td>
                        <td>{$configData['canshu6'] * 100}%</td>
                        <td>{$configData['canshu7'] * 100}%</td>
                    </tr>
                    <tr>
                        <td>12个月</td>
                        <td>{$configData['canshu8'] * 100}%</td>
                        <td>{$configData['canshu9'] * 100}%</td>
                        <td>{$configData['canshu10'] * 100}%</td>
                    </tr>
                    <tr>
                        <td>18个月</td>
                        <td>{$configData['canshu11'] * 100}%</td>
                        <td>{$configData['canshu12'] * 100}%</td>
                        <td>{$configData['canshu13'] * 100}%</td>
                    </tr>
                </table>
                <div style="padding-top: 10px;font-size: 12px;color: #FFF;">注：GBC每月释放为可流通代币，将于每月1号（GTM+0时区）发放。</div>
            </div>

        </div>
 
        <!-- <div class="row-fluid qk" style=" margin-top:15px; height:100%;"> 
            <div style=" font-size:16px; color:#fff; padding-top:10px; margin-left:15px; padding-bottom:10px;">锁仓记录</div>
            <div class="line1"></div>
        
            <volist name="lockData" id="vo">
            <div style=" height:60px; padding-top:10px;">  
                <div style=" float:left; padding-left:15px; padding-top:5px; "><img src="__IMG__/sc2.png"  width="30" height="30" /></div>

                <div style="float:left; width:30%; padding-left:15px;">
                    <div class="t1">GBC(锁仓)</div>
                    <div style=" font-size:14px; color:#808bab;">
                        <if condition="$vo.type eq 7  ">6个月
                            <elseif condition="$vo.type eq 8"/>12个月
                            <elseif condition="$vo.type eq 9"/>18个月
                        </if>
                        <if condition="$vo.reason eq '用户追加锁仓'">
                            (追加) 
                        </if>
                                       
                    </div>
                   
                </div>                              
              
                <div style="  float:right; padding-right:15px; text-align:right;">
                   <div class="t1" >{$vo.transaction_number}</div>
                   <div style=" font-size:16px; color:#808bab;">{$vo.transaction_time|date="Y-m-d H:i:s",###}</div>
                </div>
            </div> 
            <div class="line1"></div>
            </volist>

        <div id="page" style="text-align: center;height:50px;line-height: 50px;">{$page}</div> 

    </div> -->
<!-- 
    <div class="row-fluid qk" style=" margin-top:15px; height:100%;"> 
            <div style=" font-size:16px; color:#fff; padding-top:10px; margin-left:15px; padding-bottom:10px;">释放记录</div>
            <div class="line1"></div>
        
            <volist name="cashData" id="vo">
            <div style=" height:60px; padding-top:10px;"> 

            <div style=" float:left; padding-left:15px; padding-top:5px; ">
                <img src="__IMG__/sc-3.png"  width="30" height="30" />
            </div>
            <div style="float:left; padding-left:15px;">
                <div class="t1">GBC &nbsp;&nbsp; 
                    <span style=" color:#00ff00; font-size:12px;">已完成</span>
                </div>
                <div class="t3">{$vo.transaction_time|date='Y-m-d H:i:s',###}</div>
            </div> 
            <div style=" float:right; padding-right:15px; text-align:right; color:#FFF; padding-top:15PX;">
           +{$vo.transaction_number}
            </div>
            </div> 

            <div class="line1"></div>
            </volist>

        <div style=" height:20px;"></div>   

    </div> -->

</div>

    <div style=" height:100px;"></div>

    <div class=" ft">        
        <div class="row">
           <!--<a href="{:U('Index/index')}"  >-->
               <a href="/index.php"  >
                    <div class="col-xs-3">
                      <img src="__IMG__/home.png" width="25" height="25"  />
                      <p class="t6">商城</p>
                    </div>
           </a>
            <a href="https://www.happycoin.pro"  >
                <div class="col-xs-3">
                    <img src="__IMG__/bourse.png" width="25" height="25"  />
                    <p class="t6">交易所</p>
                </div>
            </a>
           <a href="{:U('Finance/index')}" >
                    <div class="col-xs-3">
                  <img src="__IMG__/zc.png" width="24" height="25"  />
                      <p class="t6">资产</p>
                    </div>
           </a>
            <a href="{:U('Locked/index')}" >
                    <div class="col-xs-3">
                    <img src="__IMG__/lock-1.png" width="24" height="25"  />
                      <p class="t5">行情</p>
                    </div>
           </a>
           <a href="{:U('Account/index')}" >
                    <div class="col-xs-3">
                   <img src="__IMG__/zh.png" width="21" height="25"  />
                      <p class="t6">账户</p>
                    </div>
           </a>
        </div>
    </div>

</body>

</html>

<script type="text/javascript">
    $("#all").click(function() {
        $("#amount").val("{$userData['reward1']}");
    });
</script>

<script type="text/javascript">
    //$(".time-selected option:selected").css('background-color','red');
    $(".time-selected").hover(function(){
        $(this).css('background-color','#162146');
        console.log(1);
    });
    $(".time-selected").change(function(event) {
        $(this).css('background-color','#162146');
    })

    $("#btn-1").click(function(){

        var balance = "{$userData['reward1']}";
        var amount = $("#amount").val();
        var locktime = $("#locktime").val();

        if(amount == '' || locktime == ''){
            layer.msg('锁仓信息不完整',{time:1000});
            return false;
        }

        if(parseFloat(amount) <= 0)
        {
            layer.msg('锁仓数量不能为0',{time:1000});
            return false;
        }

        if(parseFloat(amount) > parseFloat(balance))

        {
            layer.msg('账户余额不足',{time:1000});
            return false;
        }

        $.ajax({
            type: 'POST',
            url: "__ACTION__",
            dataType: 'json',
            data: {
                amount:amount,
                type:locktime
            },       
            success: function(data){
                 if(data.code>0){
                    layer.msg(data.message,{time:1000});
                    
                    window.location.href="{:U('Locked/index')}";
                 }
                 else{
                    layer.msg(data.message,{time:1000});
                 }
            }
        }) 
    }); 




</script>